package cn.tedu.system.service.impl;

import cn.tedu.system.mapper.TransactionMapper;
import cn.tedu.system.pojo.param.TransactionAddParam;
import cn.tedu.system.pojo.po.TransactionPO;
import cn.tedu.system.service.TransactionsService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ITransactionsService implements TransactionsService {
    @Autowired
    TransactionMapper mapper;
    @Override
    public Integer addNew(TransactionAddParam param) {
        TransactionPO transactionPO=new TransactionPO();
        BeanUtils.copyProperties(param,transactionPO);
        int insert = mapper.insert(transactionPO);
        return insert;
    }
}
